<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <title>Print- BIG Data Center</title>

   <link rel="stylesheet" type="text/css"
          href="${host}/static/DataTables-1.10.12/media/css/dataTables.bootstrap.min.css">

<%--    <link rel="stylesheet" type="text/css"
          href="${host}/static/DataTables-1.10.12/media/css/jquery.dataTables.min.css">--%>


    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/responsive/2.1.0/css/responsive.dataTables.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.2.2/css/buttons.dataTables.min.css">

    <style type="text/css" class="init">
    </style>

    <script type="text/javascript" src="${host}/static/DataTables-1.10.12/media/js/jquery.dataTables.js"></script>

    <script type="text/javascript"
            src="${host}/static/DataTables-1.10.12/media/js/dataTables.bootstrap.min.js"></script>


    <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/responsive/2.1.0/js/dataTables.responsive.min.js"></script>
    <script type="text/javascript" language="javascript" src="https://cdn.datatables.net/buttons/1.2.2/js/dataTables.buttons.min.js"></script>
    <script type="text/javascript" language="javascript" src="//cdn.datatables.net/buttons/1.2.2/js/buttons.flash.min.js"></script>
    <script type="text/javascript" language="javascript" src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
    <script type="text/javascript" language="javascript" src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script>
    <script type="text/javascript" language="javascript" src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script>
    <script type="text/javascript" language="javascript" src="//cdn.datatables.net/buttons/1.2.2/js/buttons.html5.min.js"></script>
    <script type="text/javascript" language="javascript" src="//cdn.datatables.net/buttons/1.2.2/js/buttons.print.min.js"></script>
    <script type="text/javascript" language="javascript" src="//cdn.datatables.net/buttons/1.2.2/js/buttons.colVis.min.js"></script>
    <script type="text/javascript" class="init">
        $(document).ready(function () {
            $('#dataTable').DataTable({

                responsive: true,
                pageLength: 100,

                dom: 'Bfrtip',
                buttons: [
                    'copy', 'csv',
                    {
                        extend: 'excelHtml5',
                        exportOptions: {
                            columns: ':visible'
                        }
                    },
                    {
                        extend: 'pdfHtml5',
                        exportOptions: {
                            columns: ':visible'
                        }
                    },
                    {
                        extend: 'print',
                        title: ' 第五届青年生物信息PI研讨会',
                        exportOptions: {
                            columns: ':visible'
                        },
                        customize: function ( win ) {
                         //  var lasttd = $(win.document.body).find( 'thead tr th:last' );
                         //   lasttd.html("Sign");
                            // alert(lasttd.html());

                            $(win.document.body)
                                    .css( 'font-size', '10pt' );

                            $(win.document.body).find( 'table' )
                                    .addClass( 'compact' )
                                    .css( 'font-size', 'inherit' );
                            $(win.document.body).find( 'h1').addClass('small').css({'font-size':'20pt', 'text-align':'center'});
                        },
                        header: true,
                        footer:true

                    },
                    {
                        extend: 'colvisGroup',
                        text: 'print info',
                        hide: [ ],
                    },
                    {
                        extend: 'colvis',
                        postfixButtons: [ 'colvisRestore' ]
                    }
                ]
            });
        });
    </script>
</head>

<body>
<div class="index">
    <label class="label label-success">Total: ${total}</label>
    <label class="label label-danger">参加会议的人数：<a href="${host}/admin/print?show=0"> ${attendNumber}</a></label>
    <label class="label label-warning">参加13号午餐人数：<a href="${host}/admin/print?show=1"> ${thirteenLunch}</a></label>
    <label class="label" style="background-color: #2d9c12">参加12号晚餐人数：<a href="${host}/admin/print?show=2"> ${twelveDinner}</a></label>
    <label class="label label-info">参加13号晚餐人数：<a href="${host}/admin/print?show=3"> ${thirteenDinner}</a></label>

    <br>
    <label class="label label-info"><a href="${host}/admin/print">All</a></label>
    <label class="label label-info"><a href="${host}/admin/print?show=4"> PI</a></label>
    <label class="label label-info"><a href="${host}/admin/print?show=5"> 非PI</a></label>

    <label class="label label-info"><a href="${host}/admin/disprint"> 讨论议题</a></label>
    <br>
    <br>
    <!-- <h3 class="text-success"><i class="fa fa-newspaper-o"></i> News List</h3> -->

    <div class="table-responsive"><table id="dataTable" class="table table-bordered table-striped">
        <thead>
        <tr class="active">
			<th>序号</th>
            <th>姓名</th>
            <th>部门</th>
            <th>签字</th>
        </tr>
        </thead>
        <tbody class="mytbody">
        <c:forEach items="${users}" var="user" varStatus="status">
            <tr>
				<td>${ status.count}</td>
                <td>${user.username}</td>
                <td>${user.department}</td>
                <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div>
   <p><c:forEach items="${users}" var="user" varStatus="status">
       ${user.email},
    </c:forEach>
   </p>
    </div>

    </div>


</div>

</body>
</html>
